/*------------------------------------------------------------------
 [ TIME-LINE Trigger Javascript ]

 Project     :	Fickle Responsive Admin Template
 Version     :	1.1
 Author      : 	AimMateTeam
 URL         :  http://aimmate.com
 Support     :  aimmateteam@gmail.com
 Primary use :	Time-line

 -------------------------------------------------------------------*/

/*-----------------------------------------------*/
jQuery(document).ready(function($) {
    'use strict';

    audioListView();
    audioPlayerPlayList();

    videoPlayerPlayList();
    videoListView();
});

/*---------------- Fickle Audio Player -------------------*/
function audioPlayerPlayList(){
    'use strict';

    new jPlayerPlaylist({
        jPlayer: "#jquery_jplayer_2",
        cssSelectorAncestor: "#jp_container_2"
    }, [
        {
            title: "Hidden",
            mp3: "http://www.jplayer.org/audio/mp3/Miaow-02-Hidden.mp3",
            oga: "http://www.jplayer.org/audio/ogg/Miaow-02-Hidden.ogg"
        },
        {
            title: "Cro Magnon Man",
            mp3: "http://www.jplayer.org/audio/mp3/TSP-01-Cro_magnon_man.mp3",
            oga: "http://www.jplayer.org/audio/ogg/TSP-01-Cro_magnon_man.ogg"
        },
        {
            title: "Your Face",
            mp3: "http://www.jplayer.org/audio/mp3/TSP-05-Your_face.mp3",
            oga: "http://www.jplayer.org/audio/ogg/TSP-05-Your_face.ogg"
        },
        {
            title: "Cyber Sonnet",
            mp3: "http://www.jplayer.org/audio/mp3/TSP-07-Cybersonnet.mp3",
            oga: "http://www.jplayer.org/audio/ogg/TSP-07-Cybersonnet.ogg"
        },
        {
            title: "Tempered Song",
            mp3: "http://www.jplayer.org/audio/mp3/Miaow-01-Tempered-song.mp3",
            oga: "http://www.jplayer.org/audio/ogg/Miaow-01-Tempered-song.ogg"
        },
        {
            title: "Lentement",
            free: true,
            mp3: "http://www.jplayer.org/audio/mp3/Miaow-03-Lentement.mp3",
            oga: "http://www.jplayer.org/audio/ogg/Miaow-03-Lentement.ogg"
        },
        {
            title: "Lismore",
            mp3: "http://www.jplayer.org/audio/mp3/Miaow-04-Lismore.mp3",
            oga: "http://www.jplayer.org/audio/ogg/Miaow-04-Lismore.ogg"
        },
        {
            title: "The Separation",
            mp3: "http://www.jplayer.org/audio/mp3/Miaow-05-The-separation.mp3",
            oga: "http://www.jplayer.org/audio/ogg/Miaow-05-The-separation.ogg"
        },
        {
            title: "Beside Me",
            mp3: "http://www.jplayer.org/audio/mp3/Miaow-06-Beside-me.mp3",
            oga: "http://www.jplayer.org/audio/ogg/Miaow-06-Beside-me.ogg"
        },
        {
            title: "Bubble",
            free: true,
            mp3: "http://www.jplayer.org/audio/mp3/Miaow-07-Bubble.mp3",
            oga: "http://www.jplayer.org/audio/ogg/Miaow-07-Bubble.ogg"
        },
        {
            title: "Stirring of a Fool",
            mp3: "http://www.jplayer.org/audio/mp3/Miaow-08-Stirring-of-a-fool.mp3",
            oga: "http://www.jplayer.org/audio/ogg/Miaow-08-Stirring-of-a-fool.ogg"
        },
        {
            title: "Partir",
            free: true,
            mp3: "http://www.jplayer.org/audio/mp3/Miaow-09-Partir.mp3",
            oga: "http://www.jplayer.org/audio/ogg/Miaow-09-Partir.ogg"
        },
        {
            title: "Thin Ice",
            mp3: "http://www.jplayer.org/audio/mp3/Miaow-10-Thin-ice.mp3",
            oga: "http://www.jplayer.org/audio/ogg/Miaow-10-Thin-ice.ogg"
        }
    ], {
        swfPath: "js",
        supplied: "oga, mp3",
        wmode: "window",
        smoothPlayBar: true,
        keyEnabled: true
    });
}


/*---------------- Fickle Video Player -------------------*/
function videoPlayerPlayList(){
    'use strict';

    new jPlayerPlaylist({
        jPlayer: "#jquery_jplayer_1",
        cssSelectorAncestor: "#jp_container_1"
    }, [
        {
            title: "Big Buck Bunny Trailer",
            artist: "Blender Foundation",
            free: true,
            m4v: "http://www.jplayer.org/video/m4v/Big_Buck_Bunny_Trailer.m4v",
            ogv: "http://www.jplayer.org/video/ogv/Big_Buck_Bunny_Trailer.ogv",
            webmv: "http://www.jplayer.org/video/webm/Big_Buck_Bunny_Trailer.webm",
            poster: "http://www.jplayer.org/video/poster/Big_Buck_Bunny_Trailer_480x270.png"
        },
        {
            title: "Finding Nemo Teaser",
            artist: "Pixar",
            m4v: "http://www.jplayer.org/video/m4v/Finding_Nemo_Teaser.m4v",
            ogv: "http://www.jplayer.org/video/ogv/Finding_Nemo_Teaser.ogv",
            webmv: "http://www.jplayer.org/video/webm/Finding_Nemo_Teaser.webm",
            poster: "http://www.jplayer.org/video/poster/Finding_Nemo_Teaser_640x352.png"
        },
        {
            title: "Incredibles Teaser",
            artist: "Pixar",
            m4v: "http://www.jplayer.org/video/m4v/Incredibles_Teaser.m4v",
            ogv: "http://www.jplayer.org/video/ogv/Incredibles_Teaser.ogv",
            webmv: "http://www.jplayer.org/video/webm/Incredibles_Teaser.webm",
            poster: "http://www.jplayer.org/video/poster/Incredibles_Teaser_640x272.png"
        }
    ], {
        size: {width: "100%", height: "auto"},
        swfPath: "js/media-player/",
        supplied: "webmv, ogv, m4v",
        smoothPlayBar: true,
        keyEnabled: true
    });
}


/*---------------- Fickle Audio List View -------------------*/
function audioListView(){
    'use strict';

    $('.audio-list-view').click(function(){
        $( ".ls-audio-playlist" ).slideToggle( "slow", "linear" );
    });
}

/*---------------- Fickle Video List View -------------------*/
function videoListView(){
    'use strict';

    $('.video-list-view').click(function(){
        $( ".ls-video-playlist" ).slideToggle( "slow", "linear" );
    });
}